#!/usr/bin/perl

use strict;
use XML::RPC;
use Data::Dumper;

use constant XMLRPC => 'http://localhost:8080/exist/xmlrpc';
my $server = XML::RPC->new(XMLRPC);

my $result = $server->call("describeCollection", "/db" );
print Dumper $result;
$result = $server->call("createCollection", "/db/segunda-prueba");
$result = $server->call("describeCollection", "/db/segunda-prueba" );
print Dumper $result;
my $xml=<<EOC;
<datos>
<cosa>Otra</cosa>
</datos>
EOC

$result = $server->call("parse", $xml, "/db/segunda-prueba/datos" );
print Dumper $result;
